|
|
|
|
|
|
|
ADO can be used from most programming languages, including Visual Basic, VBA within any of the Microsoft Office products (Microsoft Excel, Microsoft Access, Microsoft PowerPoint, and Microsoft Word), Visual C++, Visual FoxPro, VBScript, and others. To use the ADO objects, you need to set a reference to the Microsoft ActiveX Data Objects 2.0 Library. Once youve referenced this library in your Visual Basic project, all the aforementioned objects can be used. |
|
|
|
|
|
|
|
|
Service Providers for OLE DB |
|
|
|
|
|
|
|
|
The service providers are the actual workhorses of the ADO/OLE DB object models. Although ADO and OLE DB provide very generic, consistent interfaces, the service providers are the ones that are customized according to the data source theyll be using. For example, the way the SQL Server service provider retrieves data is completely different than the way the Jet MDB service provider retrieves data. |
|
|
|
|
|
|
|
|
There are currently three native OLE DB providers that can supply data through OLE DB to ADO. These are for Jet, SQL Server, and Oracle. As mentioned, each works very differently underneath the hood, but the syntax used from a Visual Basic application is exactly the same. Native providers promise to support more features of the data source because they can get at all the features of that data source. In addition, they should also be much faster because theres no intermediate layer such as an ODBC driver. |
|
|
|
|
|
|
|
|
The ODBC provider is simply a wrapper on top of the Open Database Connectivity (ODBC) standard. ODBC is a standard proposed by Microsoft for connecting to various database servers through a common application programming interface (API). Its a standard set of function calls that can be utilized from C, C++, Visual Basic, Delphi, PowerBuilder, and just about any front-end tool. This API allows you to program your source code one time and easily port that application to another database server with little or no coding changes. ODBC is installed with Visual Basic, any of the Microsoft Office products, and with Visual Studio. Most likely, youve ODBC already installed on your system. |
|
|
|
|
|